// PDMSClassRegister.h: interface for the PDMSClassRegister class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PDMSCLASSREGISTER_H__FB68362E_0AB2_4DAE_B984_BE1ED0E9E6F2__INCLUDED_)
#define AFX_PDMSCLASSREGISTER_H__FB68362E_0AB2_4DAE_B984_BE1ED0E9E6F2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#pragma warning ( disable : 4786 )
#pragma warning ( disable : 4291 )

#include "singleton.h"
#include "RegisterInfo.h"
#include "Register.h"


#define UE_PDMSCLASS_REGKEY_TYPE StdString

namespace PDMS
{
	namespace PDMSFrame
	{
		class UeDbObject;
		class DllExport PDMSClassRegisterInfo : public RegisterInfo< 
												UE_PDMSCLASS_REGKEY_TYPE, UeDbObject* >
		{
		public:
			PDMSClassRegisterInfo(const UE_PDMSCLASS_REGKEY_TYPE& key,
							const StdString& strStyleName,
							UeDbObject* (*pCreateObject)());
			virtual ~PDMSClassRegisterInfo();
		};

		class DllExport PDMSClassRegister : public RegisterTemplate<
											UE_PDMSCLASS_REGKEY_TYPE, PDMSClassRegisterInfo* >
		{
			DECLARE_SINGLETON( PDMSClassRegister );
		public:
			PDMSClassRegister();
			virtual ~PDMSClassRegister();
			
		public:
			BOOL HasClass( const UE_PDMSCLASS_REGKEY_TYPE& strClassName );
			UeDbObject* CreateObject( const UE_PDMSCLASS_REGKEY_TYPE& strClassName );
		};
	}
}

#endif // !defined(AFX_PDMSCLASSREGISTER_H__FB68362E_0AB2_4DAE_B984_BE1ED0E9E6F2__INCLUDED_)
